﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TDuProfile : MonoBehaviour
{
    private static TDuProfile _instance;
    public static TDuProfile Instance { get { return _instance; } }

    public Profile m_profile;
    public Dictionary<string, Profile> Profiles = new Dictionary<string, Profile>();
    private void Awake()
    {
        DontDestroyOnLoad(this);
        if (_instance != null)
        {
            Destroy(this.gameObject); return;
        }
        else
        {
            _instance = this;
        }

        Profiles.Add("模块一产品介绍", new Profile { modelName = "产品介绍model",
            AnimationObjName= "产品介绍model", 
            resourcePath = "模块一产品介绍/", strExmFullPath = "天马模块1.EXM",
            vecViewPort = { position = new Vector3(2.7f, 0, 4.525f), rotation = new Vector3(0, 180, 0) } }); 


        Profiles.Add("模块二工具的使用", new Profile { modelName = "工具的使用model",
            AnimationObjName = "工具的使用model",
            resourcePath = "模块二工具的使用/", strExmFullPath = "天马模块2.EXM",
            vecViewPort = { position = new Vector3(0, 0, 0), rotation = new Vector3(0, 0, 0) } }); 


        Profiles.Add("模块四模块检测", new Profile { modelName = "模块检测model",
            AnimationObjName = "模块检测model",
            resourcePath = "模块四模块检测/", strExmFullPath = "天马模块4.EXM",
            vecViewPort = { position = new Vector3(-0.6f, 0, 0), rotation = new Vector3(0, 90, 0) } });

    }
    public class Profile
    {

        public string modelName;//模型
        public string AnimationObjName;
        public string resourcePath;
        public string strExmFullPath;//配置文件路径
        public vecViewPort vecViewPort=new vecViewPort();//初始视点

    }
    public class vecViewPort
    {
        public Vector3 position;
        public Vector3 rotation;
    }
    // Start is called before the first frame update
}
